<?php
session_start();
include('includes/db/sql.functions.php');


$errores=Array();
$biobit_name= $_POST['biobit_name'.$id];
if($biobit_name == ""){
	$errores[name]= "Empty name";

}else{
	$getname=$biobit_name;
}

$biobit_desc= $_POST['biobit_desc'.$id];
if($biobit_desc == ""){
	$errores[desc]= "Empty description";
}else{
	$getdesc=$biobit_desc;
}
$biobit_link= $_POST['biobit_link'.$id];
if($biobit_link == ""){
	//$errores[link]= "Empty link";
}else{
	$getlink=$biobit_link;
}

if(empty($errores)){
	$_SESSION["biobitForm"]["errores"]="";
	$query=add_biobit($biobit_name, $biobit_desc, $biobit_link);
	if($query!=-9){
		Header("Location: wires.php?success=biobit");
	}
	

}else{
	$_SESSION["biobitForm"]["errores"]=$errores;
	Header("Location: newBiobit.php?bb=".$getname."&desc=".$getdesc."&link=".$getlink);
}


?>
